/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package managedbean;

import entity.SalesLeadEntity;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import session.stateless.SalesLeadSessionBean;
import java.util.*;
import javax.ejb.EJB;

/**
 *
 * @author Andy
 */
@ManagedBean(name = "salesLeadDataTableBean")
@RequestScoped
public class SalesLeadDataTableBean {

    /** Creates a new instance of SalesLeadDataTableBean */
    public SalesLeadDataTableBean() {
    }
    
    @EJB
    private SalesLeadSessionBean salesLeadSessionBean;

    public List<SalesLeadEntity> getSalesLeads() {
        List<SalesLeadEntity> salesLeads = getSalesLeadSessionBean().getAllSalesLeads();
        return salesLeads;
    }

    /**
     * @return the salesLeadSessionBean
     */
    public SalesLeadSessionBean getSalesLeadSessionBean() {
        return salesLeadSessionBean;
    }

    /**
     * @param salesLeadSessionBean the salesLeadSessionBean to set
     */
    public void setSalesLeadSessionBean(SalesLeadSessionBean salesLeadSessionBean) {
        this.salesLeadSessionBean = salesLeadSessionBean;
    }
}
